# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from enum import Enum
import os
DEFAULT_AI_MODEL = os.environ.get('DEFAULT_AI_MODEL')
if not DEFAULT_AI_MODEL:
    DEFAULT_AI_MODEL = "deepseek-chat"


class TaskType(Enum):
    AI_SOCIETY = "ai_society"
    MISALIGNMENT = "misalignment"
    TRANSLATION = "translation"
    EVALUATION = "evaluation"
    SOLUTION_EXTRACTION = "solution_extraction"
    CHATAD = "chat_ad"
    DEFAULT = "default"


class RoleType(Enum):
    ASSISTANT = "assistant"
    USER = "user"
    CRITIC = "critic"
    EMBODIMENT = "embodiment"
    DEFAULT = "default"
    CHATAD = "AgentTech"
    CHATAD_COUNSELOR = "counselor"
    CHATAD_CEO = "Chief Executive Officer(CEO)"
    CHATAD_CMO = "Chief Marketing Officer (CMO)"
    CHATAD_DE = "Data Engineer(DE)"
    CHATAD_MAA = "Market Analyst Agent (MAA)"
    CHATAD_AP = "Ad Planner (AP)"
    CHATAD_SP = "Strategic Planner (SP)"
    CHATAD_PPTC = "PPT Creator (PPTC)"


class ModelType(Enum):
    DEFAULT_MODEL = DEFAULT_AI_MODEL
    STUB = "stub"

    @property
    def value_for_tiktoken(self):
        return self.value if self.name != "STUB" else DEFAULT_AI_MODEL


class PhaseType(Enum):
    REFLECTION = "reflection"
    RECRUITING_CPO = "recruiting CPO"
    RECRUITING_CTO = "recruiting CTO"
    DEMAND_ANALYSIS = "demand analysis"
    RECRUITING_CCO = "recruiting chief creative officer"
    ADVERTISING_SHOOTING_SUGGESTIONS = "advertising shooting suggestions"
    DATA_CRAWLING = "data crawling"
    MARKET_ANALYSIS = "market analysis"
    RECOMMENDATIONS_FOR_PLACEMENT = "recommendations for placement"
    PPT_GENERATION = "ppt generation"

__all__ = ["TaskType", "RoleType", "ModelType", "PhaseType"]
